import 'package:FiduMart/generated/json/base/json_convert_content.dart';
import 'package:FiduMart/core/network/model/cdn_gift_pic_entity.dart';

CdnGiftPicEntity $CdnGiftPicEntityFromJson(Map<String, dynamic> json) {
  final CdnGiftPicEntity cdnGiftPicEntity = CdnGiftPicEntity();
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    cdnGiftPicEntity.name = name;
  }
  final String? awardNum = jsonConvert.convert<String>(json['award-num']);
  if (awardNum != null) {
    cdnGiftPicEntity.awardNum = awardNum;
  }
  final String? icon = jsonConvert.convert<String>(json['icon']);
  if (icon != null) {
    cdnGiftPicEntity.icon = icon;
  }
  final String? libaotu = jsonConvert.convert<String>(json['libaotu']);
  if (libaotu != null) {
    cdnGiftPicEntity.libaotu = libaotu;
  }
  final int? startdate = jsonConvert.convert<int>(json['startdate']);
  if (startdate != null) {
    cdnGiftPicEntity.startdate = startdate;
  }
  final int? hiddendate = jsonConvert.convert<int>(json['hiddendate']);
  if (hiddendate != null) {
    cdnGiftPicEntity.hiddendate = hiddendate;
  }
  final String? dailingquZh = jsonConvert.convert<String>(json['dailingqu_Zh']);
  if (dailingquZh != null) {
    cdnGiftPicEntity.dailingquZh = dailingquZh;
  }
  final String? dailingquEn = jsonConvert.convert<String>(json['dailingqu_En']);
  if (dailingquEn != null) {
    cdnGiftPicEntity.dailingquEn = dailingquEn;
  }
  final String? dailingquTha = jsonConvert.convert<String>(
      json['dailingqu_Tha']);
  if (dailingquTha != null) {
    cdnGiftPicEntity.dailingquTha = dailingquTha;
  }
  final String? jiangliZh = jsonConvert.convert<String>(json['jiangli_Zh']);
  if (jiangliZh != null) {
    cdnGiftPicEntity.jiangliZh = jiangliZh;
  }
  final String? jiangliEn = jsonConvert.convert<String>(json['jiangli_En']);
  if (jiangliEn != null) {
    cdnGiftPicEntity.jiangliEn = jiangliEn;
  }
  final String? jiangliTha = jsonConvert.convert<String>(json['jiangli_Tha']);
  if (jiangliTha != null) {
    cdnGiftPicEntity.jiangliTha = jiangliTha;
  }
  final String? weidengluZh = jsonConvert.convert<String>(json['weidenglu_Zh']);
  if (weidengluZh != null) {
    cdnGiftPicEntity.weidengluZh = weidengluZh;
  }
  final String? weidengluEn = jsonConvert.convert<String>(json['weidenglu_En']);
  if (weidengluEn != null) {
    cdnGiftPicEntity.weidengluEn = weidengluEn;
  }
  final String? weidengluTha = jsonConvert.convert<String>(
      json['weidenglu_Tha']);
  if (weidengluTha != null) {
    cdnGiftPicEntity.weidengluTha = weidengluTha;
  }
  return cdnGiftPicEntity;
}

Map<String, dynamic> $CdnGiftPicEntityToJson(CdnGiftPicEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['name'] = entity.name;
  data['award-num'] = entity.awardNum;
  data['icon'] = entity.icon;
  data['libaotu'] = entity.libaotu;
  data['startdate'] = entity.startdate;
  data['hiddendate'] = entity.hiddendate;
  data['dailingqu_Zh'] = entity.dailingquZh;
  data['dailingqu_En'] = entity.dailingquEn;
  data['dailingqu_Tha'] = entity.dailingquTha;
  data['jiangli_Zh'] = entity.jiangliZh;
  data['jiangli_En'] = entity.jiangliEn;
  data['jiangli_Tha'] = entity.jiangliTha;
  data['weidenglu_Zh'] = entity.weidengluZh;
  data['weidenglu_En'] = entity.weidengluEn;
  data['weidenglu_Tha'] = entity.weidengluTha;
  return data;
}

extension CdnGiftPicEntityExt on CdnGiftPicEntity {
  CdnGiftPicEntity copyWith({
    String? name,
    String? awardNum,
    String? icon,
    String? libaotu,
    int? startdate,
    int? hiddendate,
    String? dailingquZh,
    String? dailingquEn,
    String? dailingquTha,
    String? jiangliZh,
    String? jiangliEn,
    String? jiangliTha,
    String? weidengluZh,
    String? weidengluEn,
    String? weidengluTha,
  }) {
    return CdnGiftPicEntity()
      ..name = name ?? this.name
      ..awardNum = awardNum ?? this.awardNum
      ..icon = icon ?? this.icon
      ..libaotu = libaotu ?? this.libaotu
      ..startdate = startdate ?? this.startdate
      ..hiddendate = hiddendate ?? this.hiddendate
      ..dailingquZh = dailingquZh ?? this.dailingquZh
      ..dailingquEn = dailingquEn ?? this.dailingquEn
      ..dailingquTha = dailingquTha ?? this.dailingquTha
      ..jiangliZh = jiangliZh ?? this.jiangliZh
      ..jiangliEn = jiangliEn ?? this.jiangliEn
      ..jiangliTha = jiangliTha ?? this.jiangliTha
      ..weidengluZh = weidengluZh ?? this.weidengluZh
      ..weidengluEn = weidengluEn ?? this.weidengluEn
      ..weidengluTha = weidengluTha ?? this.weidengluTha;
  }
}